package br.com.simulador.session;

import br.com.simulador.model.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("itemQuestaoList")
public class ItemQuestaoList extends EntityQuery<ItemQuestao> {

	private static final String EJBQL = "select itemQuestao from ItemQuestao itemQuestao";

	private static final String[] RESTRICTIONS = { "lower(itemQuestao.descricao) like lower(concat(#{itemQuestaoList.itemQuestao.descricao},'%'))", };

	private ItemQuestao itemQuestao = new ItemQuestao();

	public ItemQuestaoList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public ItemQuestao getItemQuestao() {
		return itemQuestao;
	}
}
